package com.jdym.back.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 贷款表
 * </p>
 *
 * @author ${author}
 * @since 2021-09-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Loan对象", description="贷款表")
public class Loan implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "贷款id")
      @TableId(value = "loan_id", type = IdType.AUTO)
    private Integer loanId;

    @ApiModelProperty(value = "企业id")
    private Integer firmId;

    @ApiModelProperty(value = "贷款金额")
    private BigDecimal loanAmount;

    @ApiModelProperty(value = "贷款期限（贷的年限）")
    private Integer loanDeadline;

    @ApiModelProperty(value = "审核id")
    private Integer checkId;

    @ApiModelProperty(value = "贷款用途")
    private String loanPurpose;

    @ApiModelProperty(value = "贷款合同")
    private String loanContract;

    @ApiModelProperty(value = "贷款状态(0-成功  1-失败 2-审批中 3-撤回)")
    @TableLogic
    private Integer loanStatus;

    @ApiModelProperty(value = "贷款日期")
    @TableField("createTime")
    private LocalDate createtime;

    @ApiModelProperty(value = "是否认证(0-是  1-否)")
    private Integer authentication;

    @ApiModelProperty(value = "合作银行ID")
    private Integer coBankId;

    @ApiModelProperty(value = "审批意见")
    private String advice;

    @ApiModelProperty(value = "bankNum")
    @TableField(value = "bankNum")
    private String bankNum;

    @TableField(exist = false)
    private LocalDate time;

    @TableField(exist = false)
    private Integer num;

    @TableField(value = "loan_rate")
    private BigDecimal loanRate;

    @TableField(exist = false)
    private String firmName;

    @TableField(exist = false)
    private Integer approvalStatus;

    @TableField(value = "put_id")
    private Integer putId;

    private Put put;



    //    查询贷款表里的企业信息，合作银行信息
    private List<Firm> firmList;
    private List<CoBank> coBankList;

    private List<Uploadfile> uploadfileList;

}
